package psd.scala;

import org.eclipse.jdt.core.dom.ASTNode;

import psd.model.IConverter;
import psd.model.IConverterFactory;
import psd.model.Scala.Converters.*;

public class ScalaConverterFactory  implements IConverterFactory {
		FactDb fdb = new FactDb();
		
		public ScalaConverterFactory(FactDb fdb) {
			this.fdb = fdb;
		}
		
		@Override
		public IConverter GetConverter(int nodeType) {
			switch (nodeType) {
			case ASTNode.TYPE_DECLARATION:
				return new ScalaTypeDeclarationConverter(fdb);
			case ASTNode.FIELD_DECLARATION:
				return new ScalaFieldDeclarationConverter(fdb);
			case ASTNode.METHOD_DECLARATION:
				return new ScalaMethodDeclarationConverter(fdb);
/*			case ASTNode.ANNOTATION_TYPE_DECLARATION:
				return new PrologAnnotationTypeDeclarationConverter(generationToolBox);
			case ASTNode.ANONYMOUS_CLASS_DECLARATION:
				return new PrologAnonymousClassDeclarationConverter(generationToolBox);
			case ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION:
				return new PrologAnnotationTypeMemberDeclarationConverter(generationToolBox);
			case ASTNode.ARRAY_ACCESS:
				return new PrologArrayAccessConverter(generationToolBox);
			case ASTNode.ARRAY_CREATION:
				return new PrologArrayCreationConverter(generationToolBox);
			case ASTNode.ARRAY_INITIALIZER:
				return new PrologArrayInitializerConverter(generationToolBox);
			case ASTNode.ARRAY_TYPE:
				return null;
			case ASTNode.ASSERT_STATEMENT:
				return new PrologAssertStatementConverter(generationToolBox);
			case ASTNode.ASSIGNMENT:
				return new PrologAssignmentConverter(generationToolBox);
			case ASTNode.BLOCK:
				return new PrologBlockConverter(generationToolBox);
			case ASTNode.BLOCK_COMMENT:
				return null;
			case ASTNode.BOOLEAN_LITERAL:
				return new PrologBooleanLiteralConverter(generationToolBox);
			case ASTNode.BREAK_STATEMENT:
				return new PrologBreakStatementConverter(generationToolBox);
			case ASTNode.CAST_EXPRESSION:
				return new PrologCastExpressionConverter(generationToolBox);
			case ASTNode.CATCH_CLAUSE:
				return new PrologCatchClauseConverter(generationToolBox);
			case ASTNode.CHARACTER_LITERAL:
				return new PrologCharacterLiteralConverter(generationToolBox);
			case ASTNode.CLASS_INSTANCE_CREATION:
				return new PrologClassInstanceCreationConverter(generationToolBox);
			case ASTNode.COMPILATION_UNIT:
				return new PrologCompilationUnitConverter(generationToolBox);
			case ASTNode.CONDITIONAL_EXPRESSION:
				return new PrologConditionalExpressionConverter(generationToolBox);
			case ASTNode.CONSTRUCTOR_INVOCATION:
				return null;
			case ASTNode.CONTINUE_STATEMENT:
				return new PrologContinueStatementConverter(generationToolBox);
			case ASTNode.EMPTY_STATEMENT:
				return new PrologEmptyStatementConverter(generationToolBox);
			case ASTNode.ENHANCED_FOR_STATEMENT:
				return new PrologEnhancedForStatementConverter(generationToolBox);
			case ASTNode.ENUM_CONSTANT_DECLARATION:
				return new PrologEnumConstantDeclarationConverter(generationToolBox);
			case ASTNode.ENUM_DECLARATION:
				return new PrologEnumDeclarationConverter(generationToolBox);
			case ASTNode.EXPRESSION_STATEMENT:
				return new PrologExpressionStatementConverter(generationToolBox);
			case ASTNode.FIELD_ACCESS:
				return new PrologFieldAccessConverter(generationToolBox);
			case ASTNode.FOR_STATEMENT:
				return new PrologForStatementConverter(generationToolBox);
			case ASTNode.IF_STATEMENT:
				return new PrologIfStatementConverter(fdb);
			case ASTNode.IMPORT_DECLARATION:
				return new PrologImportDeclarationConverter(generationToolBox);
			case ASTNode.INFIX_EXPRESSION:
				return new PrologInfixExpressionConverter(generationToolBox);
			case ASTNode.INITIALIZER:
				return new PrologInitializerConverter(generationToolBox);
			case ASTNode.INSTANCEOF_EXPRESSION:
				return new PrologInstanceofExpressionConverter(generationToolBox);
			case ASTNode.LABELED_STATEMENT:
				return new PrologLabeledStatementConverter(generationToolBox);
			case ASTNode.LINE_COMMENT:
				return null;
			case ASTNode.MARKER_ANNOTATION:
				return new PrologMarkerAnnotationConverter(generationToolBox);
			case ASTNode.MEMBER_REF:
				return null;
			case ASTNode.MEMBER_VALUE_PAIR:
				return new PrologMemberValuePairConverter(generationToolBox);
			case ASTNode.METHOD_REF:
				return null;
			case ASTNode.METHOD_REF_PARAMETER:
				return null;
			case ASTNode.METHOD_INVOCATION:
				return new PrologMethodInvocationConverter(generationToolBox);
			case ASTNode.MODIFIER:
				return null;
			case ASTNode.NORMAL_ANNOTATION:
				return new PrologNormalAnnotationConverter(generationToolBox);
			case ASTNode.NULL_LITERAL:
				return new PrologNullLiteralConverter(generationToolBox);
			case ASTNode.NUMBER_LITERAL:
				return new PrologNumberLiteralConverter(generationToolBox);
			case ASTNode.PACKAGE_DECLARATION:
				return new PrologPackageDeclarationConverter(generationToolBox);
			case ASTNode.PARAMETERIZED_TYPE:
				return new PrologParameterizedTypeConverter(generationToolBox);
			case ASTNode.PARENTHESIZED_EXPRESSION:
				return new PrologParenthesizedExpressionConverter(generationToolBox);
			case ASTNode.PREFIX_EXPRESSION:
				return new PrologPrefixExpressionConverter(generationToolBox);
			case ASTNode.PRIMITIVE_TYPE:
				return new PrologPrimitiveTypeConverter(generationToolBox);
			case ASTNode.POSTFIX_EXPRESSION:
				return new PrologPostfixExpressionConverter(generationToolBox);
			case ASTNode.QUALIFIED_NAME:
				return new PrologQualifiedNameConverter(generationToolBox);
			case ASTNode.QUALIFIED_TYPE:
				return new PrologQualifiedTypeConverter(generationToolBox);
			case ASTNode.RETURN_STATEMENT:
				return new PrologReturnStatementConverter(generationToolBox);
			case ASTNode.SIMPLE_NAME:
				return new PrologSimpleNameConverter(generationToolBox);
			case ASTNode.SIMPLE_TYPE:
				return new PrologSimpleTypeConverter(generationToolBox);
			case ASTNode.SINGLE_MEMBER_ANNOTATION:
				return new PrologSingleMemberAnnotationConverter(generationToolBox);
			case ASTNode.SINGLE_VARIABLE_DECLARATION:
				return new PrologSingleVariableDeclarationConverter(generationToolBox);
			case ASTNode.STRING_LITERAL:
				return new PrologStringLiteralConverter(generationToolBox);
			case ASTNode.SUPER_CONSTRUCTOR_INVOCATION:
				return new PrologSuperConstructorInvocationConverter(generationToolBox);
			case ASTNode.SUPER_FIELD_ACCESS:
				return new PrologSuperFieldAccessConverter(generationToolBox);
			case ASTNode.SUPER_METHOD_INVOCATION:
				return new PrologSuperMethodInvocationConverter(generationToolBox);
			case ASTNode.SWITCH_CASE:
				return new PrologSwitchCaseConverter(generationToolBox);
			case ASTNode.SWITCH_STATEMENT:
				return new PrologSwitchStatementConverter(generationToolBox);
			case ASTNode.SYNCHRONIZED_STATEMENT:
				return new PrologSynchronizedStatementConverter(generationToolBox);
			case ASTNode.TAG_ELEMENT:
				return null;
			case ASTNode.TEXT_ELEMENT:
				return null;
			case ASTNode.THIS_EXPRESSION:
				return new PrologThisExpressionConverter(generationToolBox);
			case ASTNode.THROW_STATEMENT:
				return new PrologThrowStatementConverter(generationToolBox);
			case ASTNode.TRY_STATEMENT:
				return new PrologTryStatementConverter(generationToolBox);
			case ASTNode.TYPE_DECLARATION_STATEMENT:
				return new PrologTypeDeclarationStatementConverter(generationToolBox);
			case ASTNode.TYPE_LITERAL:
				return new PrologTypeLiteralConverter(generationToolBox);
			case ASTNode.TYPE_PARAMETER:
				return new PrologTypeParameterConverter(generationToolBox);
			case ASTNode.VARIABLE_DECLARATION_EXPRESSION:
				return new PrologVariableDeclarationExpressionConverter(generationToolBox);
			case ASTNode.VARIABLE_DECLARATION_FRAGMENT:
				return new PrologVariableDeclarationFragmentConverter(generationToolBox);
			case ASTNode.VARIABLE_DECLARATION_STATEMENT:
				return new PrologVariableDeclarationStatementConverter(generationToolBox);
			case ASTNode.WHILE_STATEMENT:
				return new PrologWhileStatementConverter(generationToolBox);
			case ASTNode.WILDCARD_TYPE:
				return new PrologWildcardTypeConverter(generationToolBox);*/
			default:
				return null;
			}
		}



}
